/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.matrimonybeans;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.Stateless;

/**
 *
 * @author 4410s
 */
@Stateless
public class Delete_ServicesDetail implements Delete_ServicesDetailLocal {
Connection conn;
boolean flag=false;
    ResultSet rs=null;
    @Override
    public Boolean Delete_ServiceDetail_data(int id) {
    try {
        
        ConnectDB conDB = new ConnectDB();
          conn = conDB.getConnection();         
              
          String strSql = " Delete ServicesDetails  where id= ? ";
          PreparedStatement pstmt = conn.prepareCall(strSql);
          pstmt.setInt(1, id);
          int count=0;
         count= pstmt.executeUpdate();
         if ( count>0) {
            flag=true;
        }else
         {
             flag=false;
         }
          
         
      
    } catch (SQLException ex) {
        Logger.getLogger(Delete_ServicesDetail.class.getName()).log(Level.SEVERE, null, ex);
    }
     return flag;
    }

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")

}
